#include<iostream>
#include<string.h>
using namespace std;

int main(){
	string a;
	int L;
	cin>>a;
	for(int i = 0;a[i]!='\0';i++){
		L++;
	}
	for(int i = 0;i <= L;i++){
		if(i<L/2){
			char t = a[i];
			a[i] = a[L-i-1];
			a[L-i-1] = t;
		}
		if ('a' <= a[i] && a[i] <= 'z')
            a[i] = (a[i] + 3 - 'a') % 26 + 'A';
		else if(a[i]<='Z'&&a[i]>='A')
			a[i] = (a[i] - 'A' + 3) % 26 + 'a';
	}
	cout<<a;
}
